package ln.javatest.day04.Demo05;
//求数组中的最大值

public class Demo05ArrayMax {
    public static void main(String[] args) {
        int[] array = {15,30,50,70,100};
        int max = array[0];
        for (int i = 1; i < array.length; i++) {
            if(max < array[i]){
                max = array[i+1];
            }
        }
        System.out.println(max);
    }
}
